/**
 * Created by standy on 2017/9/11.
 */

$(function(){
   var submit=$('.text-center');
  submit.click(function(event){

      var user=$(':text[title][name="user_name"]').val();
      var email=$(':text[title][name="UserEmail"]').val();
      var password=$(':password[title][name="UserPasswd"]').val();

      $.post('/admin/user/singin.json',{user_name:user,UserEmail:email,UserPasswd:password},function(res){
            // console.log($res)
           if(res.code===1){
               alert('注册成功');
               location.href="/admin/index/login";
           }else{
               alert('注册失败');
           }
      });
      window.event.returnValue = false;
  });

})
